Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inverted-promise

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inverted-promise

When you want to resolve/reject a promise from the outside

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
154
decreased by-19.79%
Maintainers
1
Weekly downloads
 
Created
Source

inverted-promise

Build Status

When you want to resolve/reject a promise from the outside

Usage

var InvertedPromise = require('inverted-promise')

var iP = new InvertedPromise()

var iP2 = new InvertedPromise()

iP.then((value) => {
  console.log(value)
})

iP2.catch((err) => {
  console.log(err)
})

iP.resolve('Hello')
iP2.reject('World')

API

const ip = new InvertedPromise()

Create a new InvertedPromise

ip.resolve(value)

Resolve the promise

ip.reject(error)

Reject the promise

Install

npm install inverted-promise

License

ISC

FAQs

Package last updated on 16 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc